<%@ page contentType="text/html" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>

<%--

<c:catch>
<c:url value="http://www.google.com" var="x" scope="request">
  <c:otherwise/>
  <c:param name="q" value="tkemmer"/>
  <c:param name="lang" value="de"/>
  <c:param name="q" value="foobar"/>
  <c:param name="x"/>
  <c:param name="ö;">1 2 3</c:param>
</c:url>
</c:catch>

<p><c:url value="/implict.jsp"/></p>
  <c:when test="x"/>
<p>${x}</p>

<c:import url="${x}"/>

<c:redirect url="http://www.google.com"/>

<p><c:out value="${42}"/></p>

<c:set var="x" scope="page">
  42
</c:set>
<c:out value="${x}">def</c:out>

<p><c:out value="${pageContext.response.contentType}">default</c:out></p>

<c:set target="${pageContext.response}" property="contentType">
  text/plain
</c:set>

<c:set target="${pageContext.response.contentType}" property="">
  text/plain
</c:set>

<p><c:out value="${pageContext.response.contentType}">default</c:out></p>



<h1>Reader #1</h1>
<p><c:out value="${pageContext.request.reader}"/></p>

<h1>Reader #2</h1>
<p><c:out value="${pageContext.request.reader}"/></p>

<h1>Reader #3</h1>
<p><c:out value="${pageContext.request.reader}"/></p>

<p>${fn:substring("abcdefg", 1, 4)}</p>
<p>${fn:length("abc")}</p>
<p>${fn:length(pageContext.request.locales)}</p>
<p>${fn:length(headerValues['accept-encoding'])}</p>
<p>${fn:length(null)}</p>
--%>

<!doctype html>
<html>
  <head>
    <title>JSP Message</title>
  </head>
  <body>
    <fmt:setLocale value="de_DE"/>
    <fmt:setBundle basename="Resources"/>
    <p>
      <fmt:message>
        greeting
      </fmt:message>
      <fmt:message>
        greeting

      </fmt:message>
    </p>
    <p>
      <fmt:formatDate pattern="YYYY-MM-dd HH:mm:ss.SSS"/>
    </p>

<%--
    <fmt:setLocale value="de_AT"/>
    <fmt:setBundle basename="Resources"/>
    <p>
      <fmt:message key="greeting">
        <fmt:param value="Oida"/>
      </fmt:message>
    </p>
    <p>
      <fmt:formatDate/>
    </p>

    <fmt:setLocale value="en_US"/>
    <fmt:bundle basename="Resources" prefix="gree">
      <p>
        <fmt:message key="ting">
          <fmt:param>
            my dear
          </fmt:param>
        </fmt:message>
      </p>
      <p>
        <fmt:formatDate/>
      </p>
    </fmt:bundle>

    <fmt:setLocale value="fr_FR"/>
    <fmt:setBundle basename="Resources"/>
    <p>
      <fmt:message key="greeting">
        <fmt:param>
        </fmt:param>
      </fmt:message>
    </p>
    <p>
      <fmt:formatDate/>
    </p>
--%>
  </body>
</html>
